-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#357 Debouncer for setting the initials #363
Conversation
Woof, Woof! Thank you @3rdvision for submitting the "#357 Debouncer for setting the initials" pull request 😎. Please do not forget to review our internal guidelines:
Engaging in the development process in the best possible way helps it being efficient and fast. Your friend, |
Woof, Woof! Oops! @3rdvision you may have to fix some errors:
Please address these issues to continue with the Pull Request merge process. Your friend, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@3rdvision Just to check, did you explore a possible solution where a cancel flag is used to stop the update promise before the existence of loadedCallback
?
For example, setting a cancelFlag
on cancel
that would be unset after the cancel request in update. If the flag was true during the update process (for example before getImageUrl
or doubleBuffer
) it would return immediately and not complete the whole update
I did made an implementation of it but it didn't offer much performance difference. The problem is update will await any previous updates here after it cancels pending updates here and there wasn't a significant performance improvement, maybe about from 6.2s to 5.2s while using the debouncer it's about 6.2s to 3.1s. It's also difficult to distinguish set initials update. In some places we have reason specifying set initials but because we also trigger initials_extra to notify the client that the initials changed after |
Co-authored-by: Ana Margarida Silva <[email protected]>
What I was sugesting was end the updatePromise earlier on cancel, since if the update process did yet not reach the Example inside
The |
Closing this in favor of a more performant approach #366 |
#363 YSL: Improve update cancellation strategy
#363 Tag: Add param `tenent_id`
initialsDebounce=275
forsetInitials
andsetInitialsExtra
.- Adapt tests
Notes:
update
was the first approach but failed to be optimal as the eventinitials_extra
triggers for anupdate
with a nullparams.reason
and it's not possible to adapt it without a huge refactor.